/******************************************************************************************
 * Import
 ******************************************************************************************/

// module
import Taro, { Component } from '@tarojs/taro'

// project
import { CPage, CContent, CHeader, CFooter, CFloat, CAround, CBetween, CCenter, CRow, CWrap, CLine, CHand, CItemX, CItemY, CText, CLabel, CSvg, CImage, CButton, CColumn } from '../../../library/comp';
import { Base64, Gen, Time, Zip, Session, Storage, Http,  } from '../../../library/func';
import Icon from '../../../project/style/icon';
import DoHttp from '../../../project/func/http/http';

/******************************************************************************************
 * Export Class
 ******************************************************************************************/

export default class HelpDetail extends Component {

	/*------------------------------------------------------------------------------------
	 * 初始化
	 *-----------------------------------------------------------------------------------*/
	constructor(props) {
		super(props);

		/**
		 * state
		 */
		this.state = {
			data:{}
		}
	}

	/*------------------------------------------------------------------------------------
	 * 生命周期
	 *-----------------------------------------------------------------------------------*/
	// willMount
	componentWillMount() {
		this.setState({
			id: this.$router.params.id
		})
	}
	// didMount
	componentDidMount() {
		DoHttp.get({
			url:'help/detail.php',
			data:{
				id: this.state.id
			},
			success:(data) => {
				this.setState({
					data: data
				})
			}
		})
	}
	
	config = {
        navigationBarTitleText: '帮助',
        navigationBarBackgroundColor: '#dd2f3c',
        navigationBarTextStyle: '#fff'
    }

	/*------------------------------------------------------------------------------------
	 * 渲染
	 *-----------------------------------------------------------------------------------*/
	render () {
		return (
			<CPage>
				<CContent bg='#f3f3f3'>
					
					{/* 帮助内容 待问新润设计 */}
					<CRow px='20' py='30' bg='#fff' size='28'>
						{this.data.set_content}
					</CRow>
					
				</CContent>
			</CPage>
		)
	}
}


